package com.ruoyi.repay.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ruoyi.repay.domain.RepaymentDetails;
import com.ruoyi.repay.domain.vo.ResultVo;
import com.ruoyi.repay.domain.vo.SearchVo;
import com.ruoyi.repay.service.RepaymentDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("repay")
public class RepaymentDetailsController {
    @Autowired
    private RepaymentDetailsService repaymentDetailsService;

//    查询还款明细
    @RequestMapping("repaymentDetailsList")
    public ResultVo repaymentDetailsList(@RequestBody SearchVo searchVo,String checkCode ){
        return repaymentDetailsService.repaymentDetailsList(searchVo,checkCode);
    }

//    添加还款编号
    @RequestMapping("add")
    public ResultVo add(Integer id){
    return repaymentDetailsService.add(id);
}

//      添加还款信息
    @RequestMapping("addrepaymentDetails")
    public ResultVo addrepaymentDetails(@RequestBody RepaymentDetails repaymentDetails){
        return repaymentDetailsService.addrepaymentDetails(repaymentDetails);
    }
}
